#!/usr/bin/perl
#createnv.cgi	Create a net volume1

require './folderman-lib.pl';

&ReadParse();
&error_setup($text{'error_mesg'});
my $automark = $in{'automark'};
my $ip = $in{'ip'};
my $ipck=check_ip($ip);
if(!$ipck){
	$err_msg=$text{'err_invalidip'};
	&error($err_msg);
}

#print $ipck."|";
my $sharepath = $in{'sharepath'};
my $volname = $in{'volname'};
#&header("Creating", "index", 0, 1);
#print $automark;
#print $ip;
#print $sharepath;
#print $volname;
$path=$ip.":".$sharepath;
&add_netvoltab($volname, $path, $automark);
#&footer("index.cgi", $text{'index'});
&redirect("index.cgi");

